﻿using AnesSystem.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;

namespace AnesSystem.Controls
{
    /// <summary>
    /// 基础表单控件
    /// </summary>
    public class BaseTableControl : RightTableCtrl
    {

        #region Variables

        #endregion

        #region Constructor

        #endregion

        public BaseTableControl()
        {
            this.GotFocus += BaseControl_GotFocus;
            this.LostFocus += BaseControl_LostFocus;
            this.Loaded += BaseControl_Loaded;
            PageOrientation = System.Printing.PageOrientation.Unknown;
        }

        #region Properties

        #endregion

        #region 依赖属性

        #endregion

        #region Event

        #endregion

        #region Private Methods

        #endregion

        #region Public/Protected Methods

        public virtual void GetLisData()
        {

        }

        #endregion

        #region EventHandlers

        private void BaseControl_LostFocus(object sender, RoutedEventArgs e)
        {

        }

        private void BaseControl_GotFocus(object sender, RoutedEventArgs e)
        {

        }

        private void BaseControl_Loaded(object sender, RoutedEventArgs e)
        {
            //if (!PermissionsManager.Instance.CanEditTables)
            //{
            //    RightContentCtrlViewModel.Instance.LayerVisibility = Visibility.Visible;
            //    DataManager.Instance.TableHeaderCtrl._anesProcessCtrl.ViewModel.IsEnable = false;
            //}
            //else
            //{
            //    RightContentCtrlViewModel.Instance.LayerVisibility = Visibility.Collapsed;
            //    DataManager.Instance.TableHeaderCtrl._anesProcessCtrl.ViewModel.IsEnable = true;
            //}
           // DataManager.Instance.TableHeaderCtrl.ViewModel.DefaultDisplayModel = 1;
        }

        #endregion
    }
}
